package com.baijia.authentication;

import java.util.Date;
import java.util.HashMap;

import com.baijia.authentication.principal.Principal;
/**
 * @title MutableAuthentication
 * @desc 可变得认证信息
 * @author caoliang
 * @date 2015年12月5日
 * @version 1.0
 */
public final class MutableAuthentication extends AbstractAuthentication {

    private static final long serialVersionUID = -4415875344376642246L;

    private final Date authenticatedDate;

    public MutableAuthentication(final Principal principal) {
        this(principal, new Date());
    }
    
    public MutableAuthentication(final Principal principal, final Date date) {
        super(principal, new HashMap<String, Object>());
        this.authenticatedDate = date;
    }

    @Override
    public Date getAuthenticatedDate() {
        return this.authenticatedDate;
    }
}
